package jsu.weizixuan.likesystem.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.Objects;

/**
 * 
 * @TableName thumb
 */
@TableName(value ="thumb")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Thumb {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long userId;

    /**
     * 
     */
    private Long blogId;

    /**
     * 创建时间
     */
    private Date createTime;

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        Thumb thumb = (Thumb) o;
        return Objects.equals(id, thumb.id) && Objects.equals(userId, thumb.userId) && Objects.equals(blogId, thumb.blogId) && Objects.equals(createTime, thumb.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userId, blogId, createTime);
    }
}